Skip to content

Twilio action#39

Merged
nicosammito merged 8 commits into
mainfrom
claude/feat-33-twilio-action-653r66
Jul 23, 2026
Merged

Twilio action#39
nicosammito merged 8 commits into
mainfrom
claude/feat-33-twilio-action-653r66

Conversation

@nicosammito

Copy link
Copy Markdown
Member

Close #33

claude and others added 3 commits July 22, 2026 07:33
Introduce a new twilio-action that integrates with the Twilio Messages API
for Hercules automations. Version 1 provides the core capability of sending
messages (SMS, MMS, and channel messages such as WhatsApp).

- sendMessage runtime function (To, Body, optional From and MediaUrl)
- TWILIO_MESSAGE response data type modeling the Twilio message resource
- Action configs: account_sid, auth_token, from_number, base_url
- Follows the existing action conventions (hercules decorators + axios REST
  client, zod-backed schemas), mirroring the gls-action layout
- Register twilio-action in the .gitlab-ci.yml node-actions matrix

Refs #33

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hrvb3LRhmxcrASCuSXc7Jn
Replace the raw axios + Twilio REST client with the official `twilio`
Node SDK for sending messages.

- helpers.ts uses twilio(accountSid, authToken) and client.messages.create,
  mapping the returned MessageInstance onto the TWILIO_MESSAGE schema
- package.json: drop axios, add twilio
- vite.config.ts: externalize twilio so it loads from node_modules at runtime
- index.ts: drop the now-unnecessary base_url config (the SDK targets
  api.twilio.com directly)

NOTE: package-lock.json must be regenerated with `npm install` so it matches
the new dependency set before CI's `npm ci` can succeed.

Refs #33

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hrvb3LRhmxcrASCuSXc7Jn
@nicosammito nicosammito self-assigned this Jul 22, 2026
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

GitLab Pipeline Action

General information

Link to pipeline: https://gitlab.com/code0-tech/development/centaurus/-/pipelines/2699655427

Status: Passed
Duration: 8 minutes

Job summaries

docs:preview

Documentation preview available at https://code0-tech.gitlab.io/-/development/telescopium/-/jobs/15493880037/artifacts/out/index.html

claude and others added 5 commits July 23, 2026 07:56
Replace the hand-written TWILIO_MESSAGE zod schema with one generated from
Twilio's official OpenAPI specification (twilio/twilio-oai,
spec/json/twilio_api_v2010.json), mirroring the woocommerce-action and
shopware-action generation pipeline.

- scripts/filterTwilioSpec.mjs reduces the large v2010 spec to the
  api.v2010.account.message component, re-exposed as `TwilioMessage`
- scripts/patchGeneratedSchemas.mjs applies the zod v3 -> v4 z.record fix
- package.json: add openapi-zod-client and a generate:twilio-schemas script
- twilioMessage.ts now uses schemas.TwilioMessage from the generated file

NOTE: run `npm install && npm run generate:twilio-schemas` to produce and
commit src/generated/twilio-schemas.ts; the action does not build until that
generated file exists.

Refs #33

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hrvb3LRhmxcrASCuSXc7Jn
@nicosammito
nicosammito merged commit bc4b27f into main Jul 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Twilio action

2 participants